/**
  ******************************************************************************
  * @file    SW_ConnStatusConf.c
  * @author  exatron
  * @version V1.0.0
  * @date    segunda, 22 de dezembro de 2014
  * @brief   Configura o monitoramento da conexão.
  ******************************************************************************
  * @attention
  *
  *
  ******************************************************************************
  */

/**
  * @addtogroup SW
  * @{
  */

/* Includes ------------------------------------------------------------------*/
#include <common.h>

BooleanType_t ISCONNSTATUS = TRUE; /* Flag deativação status conexão */

/* External functions --------------------------------------------------------*/

/**
  * @defgroup SW_Functions
  * @{
  */

/**
  * @brief  Configura o monitoramento da conexão.
  * @param  BooleanType_t Habilita ou desabilita
  * @retval Devolve pela serial Result_t
  */
void SW_ConnStatusConf(BooleanType_t conf)
{
	if(conf == FALSE)
	{
		aux_FileWrLine(PATH_CONF, "connstatusconf", aux_itoa(FALSE), "ConnStatusConf\r\n");
		ISCONNSTATUS = FALSE;
		aux_USART0_puts("%s=%d\r\n", "SW_CSC", Result_Ok);
	}
	else if(conf == TRUE)
	{
		aux_FileWrLine(PATH_CONF, "connstatusconf", aux_itoa(TRUE), "ConnStatusConf\r\n");
		ISCONNSTATUS = TRUE;
		aux_USART0_puts("%s=%d\r\n", "SW_CSC", Result_Ok);
	}
	else
	{
		aux_USART0_puts("%s=%d\r\n", "SW_CSC", Result_BadArgument);
	}

	aux_SetBusy(FALSE);
}

/**
  * @}
  */

/**
  * @}
  */


